#!bin/bash

Normal=$1
input_dir=$3
out_dir=$4
echo $Normal

#######################
## 激活配置环境
config_path=$2
source ${config_path}/config.sh
source activate test_new
source activate citup

#######################
## 提供输入输出
input_path=${input_dir}
out_path=${out_dir}
mkdir -p ${out_path}/${Normal}_tmp
mkdir -p ${out_path}/${Normal}_pipe
cd ${out_path}

#######################
## run
${citup_python} ${tools_path}/citup/citup/run_citup_qip.py \
${input_path}/${Normal}_freq.tsv  \
${input_path}/${Normal}_cluster.tsv \
${out_path}/${Normal}_Citeup.h5 \
--submit local \
--tmpdir ${out_path}/${Normal}_tmp \
--pipelinedir ${out_path}/${Normal}_pipe \
--max_nodes 8 \
--maxjobs 6 \
--repopulate \
--rerun \
2> ${log_path}/Pyclone_citeup_${Normal}.log
